﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;

public partial class Minicurso_EditarMinicurso : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["i"] == null)
            Response.Redirect("GerenciarMinicursoAG.aspx");
        if (Session["Usuario"] == null || Session["TipoUsuario"] == null)
            Response.Redirect("../Login.aspx");
        if (Session["Evento"] == null)
            Response.Redirect("../DefaultAG.aspx");
        if (Session["TipoUsuario"].ToString() != "Administrador Geral")
            Response.Redirect("../Default.aspx");
    }
    [WebMethod]
    public static bool editar(string idMinucurso, string titulo, string descricao, string vagas, string local)
    {
        return Minicurso.changeMinicurso(idMinucurso, titulo, descricao, vagas, local);
    }
    [WebMethod]
    public static Minicurso carregar(string idMinucurso)
    {
        return Minicurso.findMinicurso(new Guid(idMinucurso));
    }
}